package j_graphics;
// ======================================
// translateEx Example
// make : pwg
// date : 2003
// note : 좌표의 절대값 변경
// ======================================

import java.awt.*;
import java.awt.event.*;

public class  TranslateEx extends Frame
{
	public TranslateEx()
	{
		addWindowListener(new myWindowAdapter());
		setTitle("translate Example");
	}

	public void paint(Graphics g)
	{
		g.translate(4,23); // 현재 좌표를 (4,23)으로 변경
		g.drawRect(0,0,100,100);
	}
	public static void main(String[] args) 
	{
		TranslateEx f= new TranslateEx();
		f.setSize(400,400);
		f.setVisible(true);
	}


	// WindowAdapter
	class myWindowAdapter extends WindowAdapter
	{
		public void windowClosing(WindowEvent e)
		{
			System.exit(0);
		}

	};
}
